﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WiiGeeDotNet.logic;

namespace WiiGeeDotNet.events
{
/**
 * 
 * This is a StateEvent, telling the listeners in which state of recognition
 * the tool is:
 * 	1 = training,
 *  2 = recognition
 *  
 * @author Benjamin 'BePo' Poppinga
 */
public class StateEvent: EventArgs {

	public const int STATE_LEARNING=1;
  public const int STATE_RECOGNIZING = 2;
	
	int state;
	ProcessingUnit analyzer;
	
	/**
	 * Create a StateEvent.
	 * 
	 * @param source The source of which the state has changed.
	 * @param state The state the source has switched to.
	 */
	public StateEvent(ProcessingUnit source, int state) {
		this.analyzer=source;
		this.state=state;
	}
	
	public int getState() {
		return this.state;
	}
	
	public ProcessingUnit getSource() {
		return this.analyzer;
	}
	
}
}
